<template>
  <div class="home">
    {{ $store.state.user }} <button @click="editUser">修改用户</button>
    <HelloWorld msg="WApp"/>
  </div>
</template>

<script lang="ts">
import { Options, Vue } from 'vue-class-component';
import HelloWorld from '@/components/HelloWorld.vue'; // @ is an alias to /src



@Options({
  components: {
    HelloWorld,
  },
  methods: {
    editUser() {
      this.$store.commit('editUser', { name: 'hulala' })
    }
  }
})
export default class Home extends Vue {}
</script>
